-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use implicit-hie #88
Use implicit-hie #88
Conversation
Hi! The problem I see with implicit-hie is that it doesnt really fit the bill of replacing cabal-helper. And while I agree that cabal-helper has a lot of problems, I do not think that just generating the So, I would like to use implicit-hie only explictly, not implicitly. To do that, I propose to use a The generated I think making this feature opt-in makes adoption easier! cc @jneira |
@fendor - I can certainly see the merits to your idea - it's nice. But I'd argue that a common problem is people who have no idea about this mechanism or hie.yaml files. For them, generating a fully commented hie.yaml always could be a real boon since now they've got explicit logging about what the tool is doing and in the comments we could even say why. That might be an alternative way to go. |
@fendor Cabal-helper failure mode is opaque, you can't see why it's broken. With implicit-hie you can see the config and fix it, without starting from scratch. Additionally in common use cases When a new user tries to write a test with hie, the implicit cabal-helper cradle greets them with this:
|
Sure, that is helpful in general.
True, I overlooked that a bit. Makes the change a bit easier to accept, imo.
To be fair, the implicit cradle discovery is always somewhat opaque. In HIE, we show the command that fails, so users can execute it on the command-line. I dont think that is fundatementally different to executing
That is true and a very annoying bug. But it does not mean that the tool itself is fundamentally flawed because of this. And bugs happen in every tool, although, admittedly, it shouldnt be in this trivial case.
that is a problem of HIE and how it doesnt react to changed cradle dependencies, such as changed As a side note, why do you need the fork of hie-bios? You could define your own |
Imo, to establish a implicit mechanism to configure loading a project in the wild it should potentially cover all use cases. If it is not able to load a project it is a bug that could be fixed but no a structural limitation. I know implicit-hie aims to be a provisional solution until Same for other new features or breaking changes in cabal and stack: cabal-helper could help us as a indirection layer in the long run.
Well i would argue that being implicit supposes being "opaque" in some degree. Using implicit-hie without config file would be too. It is matter of error quality and you can suggest generate a explicit hie.yaml file with gen-hie(or show it directly in the error?) to workaround cabal-helper or implicit-hie problems in the same way. The bug with test and bench components and stack is caused by the fact that stack does not build them by default, it asks users to do a EDIT: The comment shares some arguments with @fendor's one but i think it could be useful |
What I mean by opaque is that cabal-helper failures for different reasons then hie-bios, the error you get from a wrong gen-hie implicit config is hie-bio's no prefix matched. I can look at the generated hie.yaml and fix the broken config. I can't fix a cabal-helper cradle.
The issue is that this has been broken for a long time, and is not the only issue. Your right it's not a structural limitation of cabal-helper, but not being a fundamental flaw does not make it work any better today. Cabal-helper is much more complex and I would posit leads to many of these simple issues, that are not present with hie.yaml files. There is a reason ghcide, hls and hie all have a
What is cabal-helper needed for after |
mmm, i am little bit confused, if i understood correctly the proposal is to use an Otoh you can propose the
Well, the fact is cabal-helper wants to integrate s-b-i (and we could help to do it). Otoh we will have to wait for a similar feature in stack (there is no even a open issue about afaik). We could decide then move that logic to another smaller library if we finally only are using that feature. |
We can include an error message that shows the yaml representation of the bios cradle. There is no equivalent transparency for cabal-helper. It either works or it doesn't. Most of my issues are with cabal-helper's stack integration. For cabal all we need is show-build-info, gen-hie could continue to be used for stack until stack adds show-build-info. |
Closing this, since it now conflicts. |
@Avi-D-coder but this is #88 😅 |
@masaeedu Your right this is the full context if that's what your looking for https://github.com/haskell/haskell-language-server/pulls?q=is%3Apr+Implicit+hie+cradle+is%3Aclosed |
Related to haskell/hie-bios#178.
Alternative to #68
Resolves #38, until stack and cabal
show-build-info
.See haskell/hie-bios#178 for bugs and progress.